package com.itfreer.data.app;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.data.app.dao.AppInfoDao;
import com.itfreer.data.app.entity.AppInfoEntity;
import com.itfreer.form.api.BaseDao;
import com.itfreer.form.api.DictionaryServiceImp;
import com.itfreer.form.api.dictionary.DictionaryEntity;

/**
 * app信息表
 */
@Component
public class AppInfoServiceImp extends DictionaryServiceImp<AppInfoEntity> implements AppInfoService {

	@Autowired
	private AppInfoDao dao;

	@Override
	protected BaseDao<AppInfoEntity> getDao() {
		return dao;
	}

	@Override
	public String getDictionaryName() {
		return "p_appinfo";
	}

	@Override
	protected DictionaryEntity convert(AppInfoEntity entity) {
		DictionaryEntity toEntity = new DictionaryEntity();
		BeanUtils.copyProperties(entity, toEntity);
		return toEntity;
	}

	@Override
	protected String getDictionaryFields() {
		return "*";
	}
	
	@Override
	protected boolean isTenant() {
		return false;
	}
}
